import request from '../utils/request.js'
// 获得文章评论
export const getComments = params => {
    return request({
        url: '/v1_0/comments',
        method: 'GET',
        params
    })
}
// 发表评论评论
export const addComments = data => {
    return request({
        url: '/v1_0/comments',
        method: 'POST',
        data
    })
}
// 点赞评论
export const addCommentsLike = target => {
    return request({
        url: '/v1_0/comment/likings',
        method: 'POST',
        data: {
            target
        }
    })
}
// 取消点赞评论
export const deleteCommentsLike = target => {
    return request({
        url: '/v1_0/comment/likings/' + target,
        method: 'DELETE'
    })
}
